[[ `cat /ql/docker/docker-entrypoint.sh |grep 'sleep 30'` ]] || echo -e '\nsleep 30\n' >> /ql/docker/docker-entrypoint.sh
stty erase '^H' && read -p "`echo -e '3.网云穿:穿透服务\n1.傻妞\n2.ninja'`" num
case "$num" in 
3)
echo "nohup ./wyc_linux_arm -token=令牌 & #后台运行命令"
if [ -r /root/wyc_linux_arm ];then
cd /root && ./wyc_linux_arm && echo "nohup ./wyc_linux_arm -token=令牌 & #后台运行"
else
cd /root && wget https://down.xiaomy.net/linux/wyc_linux_arm && \ 
chmod 777 ./wyc_linux_arm && \
./wyc_linux_arm #前台运行 && \
echo "nohup ./wyc_linux_arm -token=令牌 & #后台运行"
fi
;;
1)
[ `which go` ] || apk add go
[ `which gcc` ] || apk add gcc
   cd 
   if [ -r /root/sillyGirl/dev.go ];then
   echo "sillygirl已下载"
   else
   #git clone https://ghproxy.com/https://github.com/zhui177/sillyGirl
   rm -rf *.zip
   wget http://91io.cn/s/y88mOsD/sillyGirl.zip
   unzip sillyGirl.zip
   rm -rf sillyGirl.zip
  fi
   if [ -e /root/sillyGirl/conf ];then
   cd /root/sillyGirl/conf
   [ -r config.yaml ] || curl https://gitee.com/ewf-9/BiJi/raw/master/config.yaml -o config.yaml
   else
   mkdir /root/sillyGirl/conf
   cd /root/sillyGirl/conf
   [ -r config.yaml ] || curl https://gitee.com/ewf-9/BiJi/raw/master/config.yaml -o config.yaml
   fi
   cd /root/sillyGirl
   source /etc/profile
   go build
   #get_char
   echo "QQ扫码登录,扫码成功后\n按 CTRL+z "
   echo '手动 cd /root/sillyGirl'
   echo -e '手动后台运行'\n'./sillyGirl -d'
   echo -e "复制上面需要用的内容后\n按任意键继续"
   
   cd /root/sillyGirl
   ./sillyGirl
echo "写入自启"
[[ `cat /ql/docker/docker-entrypoint.sh |grep sillyGirl` ]] || echo -e '\nnohup $(while true;do if [[ `ps -ef |grep -v grep|grep sillyGirl` ]];then ps -ef |grep -v grep|grep sillyGirl;else cd /root/sillyGirl && ./sillyGirl -d;fi done) &\n' >> /ql/docker/docker-entrypoint.sh
;;
2)
cd /ql
git clone https://ghproxy.com/https://github.com/Hnsyx/Waikiki_ninja /ql/ninja
cd /ql/ninja/backend
cp .env.example .env
cp sendNotify.js /ql/scripts/sendNotify.js
pnpm install
pm2 start
echo "自启设置"
[[ `cat /ql/docker/docker-entrypoint.sh |grep ninja` ]] || echo -e '\ncd /ql/ninja/backend/ && pm2 start\n' >> /ql/docker/docker-entrypoint.sh
;;
*)
;;
esac
